﻿using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;


namespace com.guojin.mj.net.message.game
{
    public class CheckGoldReq: Message
    {
        public static int TYPE = 12 ;
        public static int ID =  54 ;

        public int UserID { get; set; }
        public int Gold { get; set; }

        public void decode(Input _in)
        {
            UserID = _in.readInt();
            Gold = _in.readInt();
        }

        public void encode(Output _out)
        {
            _out.writeInt(UserID);
            _out.writeInt(Gold);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("");
        }

        public static CheckGoldReq create(int userId, int gold)
        {
            var temp = new CheckGoldReq();
            temp.UserID = userId;
            temp.Gold = gold;
            return temp;
        }
    }
}